<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>个人中心</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="../../css/common.css" />
    <style>
        html,
        body {
            width: 100%;
            min-height: 100%;
            background: #F3EFEE;
        }

        .aui-active .aui-bar-tab-label {
            color: #f5a51c
        }

        .login {
            height: 240px;
            background-image: -webkit-linear-gradient(0deg, #f5c674, #ed824c);
            /*background-image: url(../../image/personal_bkg.jpg);background-repeat: no-repeat; background-size: cover;*/
            position: relative;
        }

        .login .personal_logo {
            width: 4rem;
            height: 4rem;
            border-radius: 50%;
            margin: 0 auto 9px;
            /*position: absolute; top: 60px; left: 20px;*/
        }

        .login .userinfo {
            position: absolute;
            top: 60px;
            text-align: center;
            left: 0;
            right: 0;
        }

        .login .userinfo .title {
            font-size: 0.8rem;
            color: #fff;
        }
        /* 设置条目 */

        .item {
            height: 3rem;
            line-height: 3rem;
            padding-left: 0.7rem;
            background-color: #fff;
        }

        .item_ico {
            float: left;
            width: 2.3rem;
            padding: 0.7rem 0.7rem 0.7rem 0;
        }

        .item_arrow {
            float: right;
            width: 1.5rem;
            padding: 1rem 0.7rem 1rem 0;
        }

        .item span {
            font-size: 0.7rem;
        }

        [v-cloak] {
            display: none;
        }

        #tab .aui-active {
            color: #f23030;
            /*border-bottom: 2px solid #f23030;*/
            border-bottom: none;
        }

        #tab .aui-active span {
            border: 1px solid #f23030;
            background: #f23030;
            padding: 0.1rem 0.2rem;
            color: #fff;
            display: inline;
            border-radius: 0.5rem;
        }

        .aui-list-item-middle {
            padding-left: 0.75rem;
        }

        .aui-radio:checked {
            background-color: #f23030;
            border: solid 1px #f23030;
        }

        .aui-toast {
            width: 9.5rem;
            background: #999;
            opacity: 0.7;
            height: 4rem;
            min-height: 4rem;
            line-height: 4rem;
        }

        .aui-toast-content {
            color: #fff;
        }

        body {
            padding-top: 2rem;
        }

        .tab_outer {
            width: 100%;
            overflow-x: scroll;
            position: fixed;
            top: 0;
            z-index: 1;
        }

        .aui-refresh-content {
            min-height: calc(100vh - 2.4rem)
        }

        .aui-media-list-item-inner .aui-list-item-title {
            width: 60%!important;
        }

        .aui-media-list-item-inner .aui-list-item-title .aui-font-size-14 {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 20px;
            height: 40px;
        }

        .aui-list .aui-media-list-item-inner .aui-list-item-right {
            max-width: 100%;
            margin-left: 0
        }

        .zp_tip {
            position: absolute;
            top: 0;
            right: 0;
            background: red;
            color: #fff;
            font-size: 0.5rem;
            padding: 0.1rem 0.2rem;
            border-radius: 0.1rem;
            font-weight: 600;
        }
    </style>
</head>

<body>
    <div id="app" style="box-sizing:border-box" v-cloak>
        <div class="tab_outer">
            <div class="aui-tab" id="tab">
                <div class="aui-tab-item aui-active" @click="type = ''"><span>全部</span></div>
                <div class="aui-tab-item" @click="type = 1"><span>待付款</span></div>
                <div class="aui-tab-item" @click="type = 2"><span>待发货</span></div>
                <div class="aui-tab-item" @click="type = 3"><span>已发货</span></div>
                <!-- <div class="aui-tab-item" @click="type = 4">已完成</div> -->
                <div class="aui-tab-item" @click="type = 5"><span>待评价</span></div>
                <div class="aui-tab-item" @click="type = 6"><span>退款中</span></div>
            </div>
        </div>

        <div id="tab1-con">
            <ul class="aui-refresh-content">
                <li v-for="(items, index) in list" :key="index">
                    <!-- 待付款 -->
                    <ul class="aui-list aui-media-list" v-if="items.order_status == 1" style="margin-top:0.5rem;">
                        <li class="aui-list-item-middle" @click="openShop(items.store_name, items.store_id)">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media" style="width:1.4rem;padding-right:5px">
                                    <img :src="items.store_logo" class="aui-list-img-sm order_sm_img">
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title aui-font-size-14">{{items.store_name}}</div>
                                        <div class="aui-list-item-right order_wait_pay">{{items.order_status | status}}</div>
                                    </div>

                                </div>
                            </div>
                        </li>
                        <li class=" aui-list-item-middle" v-for="item in items.goods" style="background:#F3EFEE;" @click="orderEval(items.o_id)">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media" style="width: 4rem;position:relative;">
                                    <img :src="item.goods_pic" class="aui-list-img-md">
                                    <div class="zp_tip" v-if="item.type==5">赠品</div>
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title" style="width: 70%;">
                                            <div class="aui-font-size-14">{{item.goods_name}}</div>
                                            <div class="aui-list-item-text">{{item.sku_info}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-if="item.type == 1">
                                            <div>￥{{item.goods_price}}</div>
                                            <div style="text-decoration:line-through;color:#999">￥{{item.goods_oprice}}</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 2">
                                            <div>{{item.goods_price}}分</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}分</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 3">
                                            <div>{{item.goods_price}}兑换币</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}兑换币</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 4">
                                            <div>×{{item.goods_nums}}</div>
                                        </div>

                                    </div>

                                </div>
                            </div>
                        </li>
                        <li class="aui-list-item-middle" style="padding-right:0.75rem;">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media">邮费</div>
                                <div class="aui-list-item-right" style="text-align:right;width: 75%;max-width:100%">￥{{items.express_fee}}</div>
                            </div>

                            <div class="aui-media-list-item-inner" style="display:flex;justify-content:flex-end;margin-top:0.2rem;">
                                <div class="aui-list-item-right" style="margin-right:8px;">共<span>{{items.goods_count}}</span>件商品</div>
                                <div class="aui-list-item-right">总计:</div>
                                <div class="aui-list-item-right" style="color:#f23030;">￥{{items.total_price}}</div>
                            </div>
                            <div class="order_footer_pay">
                                <div class="order_footer_btn" @click="orderClose('block', items.o_id)">取消订单</div>
                                <div class="order_footer_btn_one" @click="makeSure(items.order_no,items.goods[0].goods_id,items.o_id)">去付款</div>
                            </div>
                        </li>
                    </ul>
                    <!-- 待付款 -->
                    <!-- 待发货 -->
                    <ul class="aui-list aui-media-list" v-else-if="items.order_status == 2" style="margin-top:0.5rem;">
                        <li class="aui-list-item-middle" @click="openShop(items.store_name, items.store_id)">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media" style="width:1.4rem;padding-right:5px">
                                    <img :src="items.store_logo" class="aui-list-img-sm order_sm_img">
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title aui-font-size-14">{{items.store_name}}</div>
                                        <div class="aui-list-item-right order_wait_pay">{{items.order_status | status}}</div>
                                    </div>

                                </div>
                            </div>
                        </li>
                        <li class=" aui-list-item-middle" v-for="item in items.goods" style="background:#F3EFEE;" @click="orderEval(items.o_id)">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media" style="width: 4rem;position:relative;">
                                    <img :src="item.goods_pic" class="aui-list-img-md">
                                    <div class="zp_tip" v-if="item.type==5">赠品</div>
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title" style="width: 70%;">
                                            <div class="aui-font-size-14">{{item.goods_name}}</div>
                                            <div class="aui-list-item-text">{{item.sku_info}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-if="item.type == 1">
                                            <div>￥{{item.goods_price}}</div>
                                            <div style="text-decoration:line-through;color:#999">￥{{item.goods_oprice}}</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 2">
                                            <div>{{item.goods_price}}分</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}分</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 3">
                                            <div>{{item.goods_price}}兑换币</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}兑换币</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 4">
                                            <div>×{{item.goods_nums}}</div>
                                        </div>

                                    </div>

                                </div>
                            </div>
                        </li>
                        <li class="aui-list-item-middle" style="padding-right:0.75rem;">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media">邮费</div>
                                <div class="aui-list-item-right" style="text-align:right;width: 75%;max-width:100%">￥{{items.express_fee}}</div>
                            </div>

                            <div class="aui-media-list-item-inner" style="display:flex;justify-content:flex-end;margin-top:0.2rem;">
                                <div class="aui-list-item-right" style="margin-right:8px;">共<span>{{items.goods_count}}</span>件商品</div>
                                <div class="aui-list-item-right">总计:</div>
                                <div class="aui-list-item-right" style="color:#f23030;">￥{{items.total_price}}</div>
                            </div>
                            <div class="order_footer_pay">
                                <div class="order_footer_btn" @click="payRefund(items.o_id)">申请退款</div>
                                <div class="order_footer_btn_one" @click="order_remid(items.o_id)">提醒发货</div>
                            </div>
                        </li>
                    </ul>
                    <!-- 待发货 -->
                    <!-- 已发货 -->
                    <ul class="aui-list aui-media-list" v-else-if="items.order_status == 3" style="margin-top:0.5rem;">
                        <li class="aui-list-item-middle" @click="openShop(items.store_name, items.store_id)">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media" style="width:1.4rem;padding-right:5px">
                                    <img :src="items.store_logo" class="aui-list-img-sm order_sm_img">
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title aui-font-size-14">{{items.store_name}}</div>
                                        <div class="aui-list-item-right order_wait_pay">{{items.order_status | status}}</div>
                                    </div>

                                </div>
                            </div>
                        </li>
                        <li class=" aui-list-item-middle" v-for="item in items.goods" style="background:#F3EFEE;" @click="orderEval(items.o_id)">
                            <div class="aui-media-list-item-inner">
                                <!-- <div class="aui-list-item-media" style="width: 4rem;">
                 <img :src="item.goods_pic" class="aui-list-img-md">
             </div> -->
                                <div class="aui-list-item-media" style="width: 4rem;position:relative;">
                                    <img :src="item.goods_pic" class="aui-list-img-md">
                                    <div class="zp_tip" v-if="item.type==5">赠品</div>
                                </div>

                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title" style="width: 70%;">
                                            <div class="aui-font-size-14">{{item.goods_name}}</div>
                                            <div class="aui-list-item-text">{{item.sku_info}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-if="item.type == 1">
                                            <div>￥{{item.goods_price}}</div>
                                            <div style="text-decoration:line-through;color:#999">￥{{item.goods_oprice}}</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 2">
                                            <div>{{item.goods_price}}分</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}分</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 3">
                                            <div>{{item.goods_price}}兑换币</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}兑换币</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 4">
                                            <div>×{{item.goods_nums}}</div>
                                        </div>

                                    </div>

                                </div>
                            </div>
                        </li>
                        <li class="aui-list-item-middle" style="padding-right:0.75rem;">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media">邮费</div>
                                <div class="aui-list-item-right" style="text-align:right;width: 75%;max-width:100%">￥{{items.express_fee}}</div>
                            </div>

                            <div class="aui-media-list-item-inner" style="display:flex;justify-content:flex-end;margin-top:0.2rem;">
                                <div class="aui-list-item-right" style="margin-right:8px;">共<span>{{items.goods_count}}</span>件商品</div>
                                <div class="aui-list-item-right">总计:</div>
                                <div class="aui-list-item-right" style="color:#f23030;">￥{{items.total_price}}</div>
                            </div>
                            <div class="order_footer_pay">
                                <!-- <div class="order_footer_btn" @click="payReSales(items.o_id)">申请退货</div> -->
                                <div class="order_footer_btn" @click="checkLogistics(items.o_id)">查看物流</div>
                                <div class="order_footer_btn_one" @click="shouhuo(items.o_id)">确认收货</div>
                            </div>
                        </li>
                    </ul>
                    <!-- 已发货 -->
                    <!-- 已完成 -->
                    <ul class="aui-list aui-media-list" v-else-if="items.order_status == 4 && items.evaluate_type == 1" style="margin-top:0.5rem;">
                        <li class="aui-list-item-middle" @click="openShop(items.store_name, items.store_id)">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media" style="width:1.4rem;padding-right:5px">
                                    <img :src="items.store_logo" class="aui-list-img-sm order_sm_img">
                                </div>

                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title aui-font-size-14">{{items.store_name}}</div>
                                        <div class="aui-list-item-right order_wait_pay">{{items.order_status | status}}</div>
                                    </div>

                                </div>
                            </div>
                        </li>
                        <li class=" aui-list-item-middle" v-for="item in items.goods" style="background:#F3EFEE;" @click="orderEval(items.o_id)">
                            <div class="aui-media-list-item-inner">
                                <!-- <div class="aui-list-item-media" style="width: 4rem;">
                 <img :src="item.goods_pic" class="aui-list-img-md">
             </div> -->

                                <div class="aui-list-item-media" style="width:4rem;position:relative;">
                                    <img :src="item.goods_pic" class="aui-list-img-md">
                                    <div class="zp_tip" v-if="item.type==5">赠品</div>
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title" style="width: 70%;">
                                            <div class="aui-font-size-14">{{item.goods_name}}</div>
                                            <div class="aui-list-item-text">{{item.sku_info}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-if="item.type == 1">
                                            <div>￥{{item.goods_price}}</div>
                                            <div style="text-decoration:line-through;color:#999">￥{{item.goods_oprice}}</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 2">
                                            <div>{{item.goods_price}}分</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}分</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 3">
                                            <div>{{item.goods_price}}兑换币</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}兑换币</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 4">
                                            <div>×{{item.goods_nums}}</div>
                                        </div>

                                    </div>

                                </div>
                            </div>
                        </li>
                        <li class="aui-list-item-middle" style="padding-right:0.75rem;">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media">邮费</div>
                                <div class="aui-list-item-right" style="text-align:right;width: 75%;max-width:100%">￥{{items.express_fee}}</div>
                            </div>

                            <div class="aui-media-list-item-inner" style="display:flex;justify-content:flex-end;margin-top:0.2rem;">
                                <div class="aui-list-item-right" style="margin-right:8px;">共<span>{{items.goods_count}}</span>件商品</div>
                                <div class="aui-list-item-right">总计:</div>
                                <div class="aui-list-item-right" style="color:#f23030;">￥{{items.total_price}}</div>
                            </div>
                            <div class="order_footer_pay">
                                <!-- <div class="order_footer_btn" @click="">删除订单</div> -->
                                <div class="order_footer_btn_one" @click="payReSales(items.o_id)">申请退货</div>
                                <!-- <div class="order_footer_btn_one" @click="checkIng(items.o_id)">查看进度</div> -->
                                <!-- <div class="order_footer_btn_one" @click="">再次购买</div> -->
                            </div>
                        </li>
                    </ul>
                    <!-- 已完成 -->
                    <!-- 待评价 -->
                    <ul class="aui-list aui-media-list" v-else-if="items.order_status == 4 && items.evaluate_type == 0" style="margin-top:0.5rem;">
                        <li class="aui-list-item-middle" @click="openShop(items.store_name, items.store_id)">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media" style="width:1.4rem;padding-right:5px">
                                    <img :src="items.store_logo" class="aui-list-img-sm order_sm_img">
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title aui-font-size-14">{{items.store_name}}</div>
                                        <div class="aui-list-item-right order_wait_pay">{{items.order_status | status}}</div>
                                    </div>
                                </div>
                            </div>
                        </li>

                        <li class=" aui-list-item-middle" v-for="item in items.goods" style="background:#F3EFEE;" @click="orderEval(items.o_id)">
                            <div class="aui-media-list-item-inner">
                                <!-- <div class="aui-list-item-media" style="width: 4rem;">
             <img :src="item.goods_pic" class="aui-list-img-md">
         </div> -->

                                <div class="aui-list-item-media" style="width: 4rem;position:relative;">
                                    <img :src="item.goods_pic" class="aui-list-img-md">
                                    <div class="zp_tip" v-if="item.type==5">赠品</div>
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title" style="width: 70%;">
                                            <div class="aui-font-size-14">{{item.goods_name}}</div>
                                            <div class="aui-list-item-text">{{item.sku_info}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-if="item.type == 1">
                                            <div>￥{{item.goods_price}}</div>
                                            <div style="text-decoration:line-through;color:#999">￥{{item.goods_oprice}}</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 2">
                                            <div>{{item.goods_price}}分</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}分</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 3">
                                            <div>{{item.goods_price}}兑换币</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}兑换币</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 4">
                                            <div>×{{item.goods_nums}}</div>
                                        </div>

                                    </div>

                                </div>
                            </div>
                        </li>
                        <li class="aui-list-item-middle" style="padding-right:0.75rem;">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media">邮费</div>
                                <div class="aui-list-item-right" style="text-align:right;width: 75%;max-width:100%">￥{{items.express_fee}}</div>
                            </div>

                            <div class="aui-media-list-item-inner" style="display:flex;justify-content:flex-end;margin-top:0.2rem;">
                                <div class="aui-list-item-right" style="margin-right:8px;">共<span>{{items.goods_count}}</span>件商品</div>
                                <div class="aui-list-item-right">总计:</div>
                                <div class="aui-list-item-right" style="color:#f23030;">￥{{items.total_price}}</div>
                            </div>
                            <div class="order_footer_pay">
                                <!-- <div class="order_footer_btn" @click="payRefund(items.o_id)">申请退款</div> -->
                                <!-- <div class="order_footer_btn_one" @click="">删除订单</div> -->
                                <div class="order_footer_btn_one" @click="orderEval(items.o_id)">去评价</div>
                            </div>
                        </li>
                    </ul>
                    <!-- 待评价 -->
                    <!-- 退款详情 @click="refoundAbout(items.o_id)" -->
                    <!-- 退货/退款 -->
                    <ul class="aui-list aui-media-list" v-else-if="items.order_status == 6 || items.order_status == 7 || items.order_status == 8 || items.order_status == 9 || items.order_status == 10" style="margin-top:0.5rem;">
                        <li class="aui-list-item-middle" @click="openShop(items.store_name, items.store_id)">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media" style="width:1.4rem;padding-right:5px">
                                    <img :src="items.store_logo" class="aui-list-img-sm order_sm_img">
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title aui-font-size-14">{{items.store_name}}</div>
                                        <div class="aui-list-item-right order_wait_pay">{{items.order_status | status}}</div>
                                    </div>

                                </div>
                            </div>
                        </li>

                        <li class=" aui-list-item-middle" v-for="item in items.goods" style="background:#F3EFEE;" @click="refoundAbout(items.o_id)">
                            <div class="aui-media-list-item-inner">
                                <!-- <div class="aui-list-item-media" style="width: 4rem;">
           <img :src="item.goods_pic" class="aui-list-img-md">
       </div> -->

                                <div class="aui-list-item-media" style="width: 4rem;position:relative;">
                                    <img :src="item.goods_pic" class="aui-list-img-md">
                                    <div class="zp_tip" v-if="item.type==5">赠品</div>
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title" style="width: 70%;">
                                            <div class="aui-font-size-14">{{item.goods_name}}</div>
                                            <div class="aui-list-item-text">{{item.sku_info}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-if="item.type == 1">
                                            <div>￥{{item.goods_price}}</div>
                                            <div style="text-decoration:line-through;color:#999">￥{{item.goods_oprice}}</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 2">
                                            <div>{{item.goods_price}}分</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}分</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 3">
                                            <div>{{item.goods_price}}兑换币</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}兑换币</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 4">
                                            <div>×{{item.goods_nums}}</div>
                                        </div>

                                    </div>

                                </div>
                            </div>
                        </li>
                        <li class="aui-list-item-middle" style="padding-right:0.75rem;">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media">邮费</div>
                                <div class="aui-list-item-right" style="text-align:right;width: 75%;max-width:100%">￥{{items.express_fee}}</div>
                            </div>

                            <div class="aui-media-list-item-inner" style="display:flex;justify-content:flex-end;margin-top:0.2rem;">
                                <div class="aui-list-item-right" style="margin-right:8px;">共<span>{{items.goods_count}}</span>件商品</div>
                                <div class="aui-list-item-right">总计:</div>
                                <div class="aui-list-item-right" style="color:#f23030;">￥{{items.total_price}}</div>
                            </div>
                            <div class="order_footer_pay">
                                <div class="order_footer_btn_one" @click="checkIng(items.o_id)">查看进度</div>
                                <!-- <div class="order_footer_btn_one" @click="">联系卖家</div> -->
                                <!-- <div class="order_footer_btn_one" @click="">取消退款</div> -->
                            </div>
                        </li>
                    </ul>
                    <!-- 退货/退款 -->
                    <!-- 其他 -->
                    <ul class="aui-list aui-media-list" v-else style="margin-top:0.5rem;">
                        <li class="aui-list-item-middle" @click="openShop(items.store_name, items.store_id)">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media" style="width:1.4rem;padding-right:5px">
                                    <img :src="items.store_logo" class="aui-list-img-sm order_sm_img">
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title aui-font-size-14">{{items.store_name}}</div>
                                        <div class="aui-list-item-right order_wait_pay">{{items.order_status | status}}</div>
                                    </div>

                                </div>
                            </div>
                        </li>

                        <li class=" aui-list-item-middle" v-for="item in items.goods" style="background:#F3EFEE;" @click="orderEval(items.o_id)">
                            <div class="aui-media-list-item-inner">
                                <!-- <div class="aui-list-item-media" style="width: 4rem;">
           <img :src="item.goods_pic" class="aui-list-img-md">
       </div> -->
                                <div class="aui-list-item-media" style="width: 4rem;position:relative;">
                                    <img :src="item.goods_pic" class="aui-list-img-md">
                                    <div class="zp_tip" v-if="item.type==5">赠品</div>
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-text">
                                        <div class="aui-list-item-title" style="width: 70%;">
                                            <div class="aui-font-size-14">{{item.goods_name}}</div>
                                            <div class="aui-list-item-text">{{item.sku_info}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-if="item.type == 1">
                                            <div>￥{{item.goods_price}}</div>
                                            <div style="text-decoration:line-through;color:#999">￥{{item.goods_oprice}}</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 2">
                                            <div>{{item.goods_price}}分</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}分</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 3">
                                            <div>{{item.goods_price}}兑换币</div>
                                            <div style="text-decoration:line-through;color:#999">{{item.goods_oprice}}兑换币</div>
                                            <div>×{{item.goods_nums}}</div>
                                        </div>
                                        <div class="aui-list-item-right" style="text-align:right;" v-else-if="item.type == 4">
                                            <div>×{{item.goods_nums}}</div>
                                        </div>

                                    </div>

                                </div>
                            </div>
                        </li>
                        <li class="aui-list-item-middle" style="padding-right:0.75rem;">
                            <div class="aui-media-list-item-inner">
                                <div class="aui-list-item-media">邮费</div>
                                <div class="aui-list-item-right" style="text-align:right;width: 75%;max-width:100%">￥{{items.express_fee}}</div>
                            </div>

                            <div class="aui-media-list-item-inner" style="display:flex;justify-content:flex-end;margin-top:0.2rem;">
                                <div class="aui-list-item-right" style="margin-right:8px;">共<span>{{items.goods_count}}</span>件商品</div>
                                <div class="aui-list-item-right">总计:</div>
                                <div class="aui-list-item-right" style="color:#f23030;">￥{{items.total_price}}</div>
                            </div>
                            <div class="order_footer_pay">
                                <!-- <div class="order_footer_btn" @click="checkIng(items.o_id)">查看进度</div> -->
                                <!-- <div class="order_footer_btn_one" @click="">联系卖家</div> -->
                                <!-- <div class="order_footer_btn_one" @click="">取消退款</div> -->
                            </div>
                        </li>
                    </ul>
                    <!-- 其他 -->
                </li>
            </ul>
        </div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/zepto.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript" src="../../script/utils.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/aui-tab.js"></script>
<script type="text/javascript" src="../../script/aui-scroll.js"></script>
<script type="text/javascript" src="../../script/aui-pull-refresh.js"></script>
<script type="text/javascript" src="../../script/aui-toast.js"></script>
<script type="text/javascript">
    var toast = new auiToast({});




    apiready = function() {
        // console.log(JSON.stringify(api));
        var app = new Vue({
            el: '#app',
            data: {
                type: 0,
                page: 1,
                totalpage: 1,
                list: [],
                reason_id: 0,
                reason_list: [],
                this_order_id: ''
            },
            created: function() {
                var $_this = this;
                $_this.type = api.pageParam.type
                $_this.getList()
                var scroll = new auiScroll({
                    listen: true, //是否监听滚动高度，开启后将实时返回滚动高度
                    distance: 40 //判断到达底部的距离，isToBottom为true
                }, function(ret) {
                    if (ret.isToBottom) {
                        $_this.page++
                            if ($_this.page > $_this.totalpage) {
                                $_this.page = $_this.totalpage
                                return
                            }
                        api.ajax({
                            url: window.Url.Freeorder_myOrder,
                            method: 'post',
                            data: {
                                values: {
                                    token: $api.getStorage('token'),
                                    type: $_this.type,
                                    page: $_this.page,
                                }
                            },
                            timeout: 300,
                        }, function(ret, err) {
                            if (ret) {
                                console.log(JSON.stringify(ret.data.list))
                                    // console.log(JSON.stringify($_this.page))
                                $_this.list = $_this.list.concat(ret.data.list)

                            } else {
                                api.alert({
                                    msg: JSON.stringify(err)
                                });
                            }
                        })
                    }

                })
            },
            watch: {
                type: function() {
                    var $_this = this
                    $_this.page = 1
                    $_this.getList()

                }
            },
            mounted: function() {
                var $_this = this
                if ($_this.type == 5 || $_this.type == 6) {
                    var type = Number($_this.type)
                } else {
                    var type = Number($_this.type) + 1
                }

                var tab = new auiTab({
                    element: document.getElementById("tab"),
                    index: type,
                    repeatClick: false
                }, function(ret) {
                    // console.log(ret);
                })
                var pullRefresh = new auiPullToRefresh({
                    container: document.querySelector('.aui-refresh-content'),
                    triggerDistance: 100
                }, function(ret) {
                    if (ret.status == "success") {
                        $_this.page = 1
                        $_this.getList(function() {
                            setTimeout(function() {
                                pullRefresh.cancelLoading(); //刷新成功后调用此方法隐藏
                            }, 500)
                        })

                    }
                })
            },
            methods: {
                getList: function(fn) {
                    var $_this = this
                    api.ajax({
                        url: window.Url.Freeorder_myOrder,
                        method: 'post',
                        data: {
                            values: {
                                token: $api.getStorage('token'),
                                type: $_this.type,
                                page: $_this.page,
                            }
                        }
                    }, function(ret, err) {
                        if (ret) {
                            if (ret.re == 1) {
                                $_this.totalpage = ret.data.sum_page
                                $_this.list = ret.data.list

                                console.log("代付款---" + JSON.stringify(ret))
                            } else {
                                $_this.totalpage = 1
                                $_this.list = []
                            }
                            fn && fn()

                        } else {
                            api.alert({
                                msg: JSON.stringify(err)
                            });
                        }
                    })
                },
                makeSure: function(order_no, goods_id, o_id) {
                    var o_ids = [];
                    o_ids.push(o_id)
                    var $_this = this
                    api.openFrame({
                        name: 'pay_order',
                        url: '../three_frame/pay_order.html',
                        bounces: false,
                        pageParam: {
                            order_no: Base64.encode('UNO' + order_no + 'HACHA'),
                            under_type: 1,
                            id: goods_id,
                            order_id: o_ids
                        }
                    });
                },
                orderClose: function(type, o_id) {
                    var $_this = this
                    api.openFrame({
                        name: 'pay_order',
                        url: './cancalResult.html',
                        bounces: false,
                        pageParam: {
                            o_id: o_id,
                            type: 1
                        }
                    });
                },
                order_remid: function(o_id) {
                    api.ajax({
                        url: window.Url.Freeorder_remindShipment,
                        method: 'post',
                        data: {
                            values: {
                                token: $api.getStorage('token'),
                                orderId: o_id,
                            }
                        },
                        timeout: 300,
                    }, function(ret, err) {
                        if (ret) {
                            api.toast({
                                msg: ret.info,
                                duration: 2000,
                                location: 'middle'
                            });
                        } else {
                            api.alert({
                                msg: JSON.stringify(err)
                            });
                        }
                    })
                },
                payRefund: function(id) {
                    api.openWin({
                        name: 'applyRefund',
                        url: './headerone.html',
                        pageParam: {
                            msg: '申请退款',
                            url: './applyRefund.html',
                            id: id
                        }
                    });
                },
                payReSales: function(id) {
                    api.openWin({
                        name: 'payReSales',
                        url: './headerone.html',
                        pageParam: {
                            msg: '申请退货',
                            url: './payReSales.html',
                            id: id
                        }
                    });
                },
                checkLogistics: function(id) {
                    api.openWin({
                        name: 'checkLogistics',
                        url: './headerone.html',
                        pageParam: {
                            msg: '查看物流',
                            url: './checkLogistics.html',
                            id: id
                        }
                    });
                },
                shouhuo: function(id) {
                    api.openFrame({
                        name: 'shouhuo',
                        url: './pay_password.html',
                        pageParam: {
                            id: id
                        }
                    });
                },
                checkIng: function(id) {
                    api.openWin({
                        name: 'checkIng',
                        url: './headerone.html',
                        pageParam: {
                            msg: '查看进度',
                            url: './checkIng.html',
                            id: id
                        }
                    });
                },
                refoundAbout: function(id) {
                    api.openWin({
                        name: 'refoundAbout',
                        url: './headerone.html',
                        pageParam: {
                            msg: '退款详情',
                            url: './refoundAbout.html',
                            id: id
                        }
                    })
                },
                orderEval: function(id) {
                    api.openWin({
                        name: 'order_evaluate',
                        url: './headerone.html',
                        pageParam: {
                            msg: '订单详情',
                            url: './order_evaluate.html',
                            id: id
                        }
                    })
                },
                openShop: function(name, id) {
                    all_open_login(function() {
                        api.openWin({
                            name: 'shop_inner',
                            url: '../two_frame/two_frame_header.html',
                            pageParam: {
                                type: 'shop_inner',
                                name: name,
                                id: id
                            }
                        })
                    })

                }
            },
            filters: {
                status: function(val) {
                    switch (Number(val)) {
                        case 1:
                            return '待付款'
                            break;
                        case 2:
                            return '待发货'
                            break;
                        case 3:
                            return '已发货'
                            break;
                        case 4:
                            return '已完成'
                            break;
                        case 5:
                            return '已关闭'
                            break;
                        case 6:
                            return '退款/售后中'
                            break;
                        case 8:
                            return '订单退货中'
                            break;
                        case 9:
                            return '返仓中'
                            break;
                        case 10:
                            return '已返仓'
                            break;
                        default:
                            return
                    }
                }
            }
        })
    }
</script>

</html>
